using System;
using UnityEngine;
using UnityEngine.UI;
using FrameOperateSync;

/// <summary>
/// runtime sync setting
/// </summary>
public class OpSyncSetting : MonoBehaviour
{
    [SerializeField]
    private bool singleModeToggle;
    [SerializeField]
    private bool delayModeToggle;
    [SerializeField]
    private bool logDelayToggle;
    [SerializeField]
    private int setFixDelayInput;
    [SerializeField]
    private int setWaveDelayInput;
    
    [SerializeField,Header("设置")]
    private bool setFlag = false;
    

    private void Update()
    {
        if (!setFlag)
            return;
        setFlag = false;
        HelperUtility.SetSetting("siglePlayerMode", singleModeToggle);
        HelperUtility.SetSetting("enableDelayInfoFlag", logDelayToggle);
        HelperUtility.SetSetting("networkLagSimulate", delayModeToggle);
        HelperUtility.SetSetting("networkLagTime", setFixDelayInput);
        HelperUtility.SetSetting("networkWaveMax", setWaveDelayInput);
    }
}